home *** CD-ROM | disk | FTP | other *** search
/ Pro Intralink 3.1 / Pro Intralink v3.1.iso / setup < prev   
Encoding:
Text File  |  2001-11-27  |  5.1 KB  |  234 lines

  1. #!/bin/sh -f
  2. #=============================================================
  3. # MODIFICATIONS
  4. # ---------------------------------------------------------
  5. # 06-Oct-97 $$1  JJE  Created.
  6. # 28-Oct-97 $$2  JJE  Use -dirs
  7. # 05-Dec-97 $$3  JJE  Remove -vrdirs, set LC_NUMERIC to C
  8. # 22-Dec-97 $$4  JJE  Check DISPLAY
  9. # 05-Jan-98 $$5  JJE  ignore
  10. # 13-Jan-98 $$6  JJE  Use delta lib
  11. # 22-Jan-98 $$7  JJE  Add . to path on sgi
  12. # 23-Jan-98 $$8  JJE  Add startup messages
  13. # 27-Jan-98 $$9  JJE  Add cr
  14. # 31-Jan-98 $$10 JJE  Don't echo argv
  15. # 23-Feb-98 $$11 ZRL  Added remote install
  16. # 06-Apr-98 $$12 JJE  Add sgi_mips4
  17. # 22-Jun-98 $$13 ZRL  removed galaxy library
  18. # 29-Jun-98 ##14 ZRL  use galaxy library only on sgi_elf2
  19. # 11-Aug-98 $$14 JJE  Fix remote install for mips4
  20. # 22-Oct-98 $$15 TWH  Fixed remote install
  21. # 11-Nov-98      TWH  Fixed cleanup
  22. # 20-Nov-98 $$16 TWH  Fixed Trusted login check for Sun
  23. # 08-Sep-99 $$17 JJE  Migrate to new installer
  24. # 20-Oct-99 $$18 MYA  Add DPS_DIRECTORY
  25. # 07-Aug-00      TWH  Check if hpux11_pa32 exists
  26. # 22-Aug-00 $$19 TWH  rewritten to /bin/sh for multicd
  27. # 18-Sep-00 $$20 TWH  support non \c echo; -multicd iff using redirect
  28. # 09-Oct-00 $$21 TWH  Fix command-line args; fix PROSETUP_EXE bug
  29. # 31-Oct-00 $$22 TWH  Fix for $0 == "setup"
  30. # 17-Jan-01 $$23 TWH  always run sun4_solaris instead of _64 this script
  31. # 16-May-01 $$24 TWH  always run hpux11_pa32 instead of hpux_pa64
  32. #=============================================================
  33.  
  34. rundir=`pwd`
  35. fullscrname=$0
  36. # :t
  37. scrname=`echo $fullscrname | awk -F"/" '{ print $NF}'`
  38. # :h
  39. fullscrpath=`echo $fullscrname | awk -F"/" '{ ORS="/"} { n=split($0,A)} { for (i = 1; i < n; i++) print A[i] }'`
  40. if [ "$fullscrpath" = "" ]
  41. then
  42.   fullscrpath=$0
  43. else
  44.   fullscrpath=`echo $fullscrpath | awk '{ n=length($0)} { n -= 1} { print substr($0,1,n)}'`
  45. fi
  46.  
  47. if [ "$fullscrpath" = "$fullscrname" ] 
  48. then
  49.   fullscrpath=`pwd`
  50. else
  51.   cd $fullscrpath
  52.   fullscrpath=`pwd`
  53. fi
  54.  
  55. echostr=`echo "test \c"`
  56. if [ "$echostr" = "test \c" ]
  57. then
  58.   alt_echo=true
  59. fi
  60.  
  61. other_args=""
  62. i=1
  63. while [ "$i" -le $# ]
  64. do
  65.   if [ "$1" = "-display" ] 
  66.   then
  67.     shift
  68.     echo "setting DISPLAY to: $1"
  69.     DISPLAY="$1"
  70.     export DISPLAY
  71.     shift
  72.   elif [ "$1" = "?" -o "$1" = "-h" -o "$1" = "-help" ]
  73.   then
  74.     echo ""
  75.     echo "Usage: $scrname [ -display unix:0 ]"
  76.     exit 0
  77.   elif [ "$1" = "-remote" ]
  78.   then
  79.     echo ""
  80.     echo "Sorry, remote installation is not supported in this release."
  81.     exit 1
  82.   elif [ "$1" = "-cdrom" ]
  83.   then
  84.     shift
  85.     echo "setting CDROM path to: $1"
  86.     fullscrpath="$1"
  87.     shift
  88.   else
  89.     other_args="$other_args $1"
  90.     shift
  91.   fi
  92. done
  93.  
  94. cd $rundir
  95. prodir=$fullscrpath
  96. imagedir=$fullscrpath
  97. getpmtscr="getpmt.csh"
  98.  
  99. if [ ! -x "$imagedir/$getpmtscr" ] 
  100. then
  101.   echo ""
  102.   echo "ERROR:  $imagedir/$getpmtscr - file is missing."
  103.   echo "        Check the name of the CD mount directory."
  104.   exit 1
  105. fi
  106.  
  107. mctype=`$imagedir/$getpmtscr`
  108. if [ "$mctype" = "UNKNOWN" ] 
  109. then
  110.   echo ""
  111.   echo "ERROR:  OS name unknown."
  112.   exit 1
  113. fi
  114.  
  115. test "$DISPLAY"
  116. if [ $? != 0 ]
  117. then
  118.   echo ""
  119.   echo 'ERROR:  The DISPLAY variable is not set - '
  120.   echo ""
  121.   echo "   Options:"
  122.   echo "      o Press <cr> to set DISPLAY to `hostname`:0.0"
  123.   echo "      o Type a value to use for the DISPLAY variable"
  124.   echo "      o Enter 'q' to abort prosetup"
  125.   echo "      o Specify '-display <host>:0' on the command line"
  126.   echo ""
  127.   test "$alt_echo"
  128.   if [ $? = 0 ]
  129.   then
  130.     echo -n "Set it to (`hostname`:0.0): [q to abort] "
  131.   else
  132.     echo "Set it to (`hostname`:0.0): [q to abort] \c"
  133.   fi
  134.   read line
  135.   if [ "$line" = "q*" -o "$line" = "Q*" ]
  136.   then
  137.     exit -1
  138.   elif [ "$line" = "" ]
  139.   then
  140.     DISPLAY="`hostname`:0.0"
  141.     export DISPLAY
  142.   else
  143.     DISPLAY="$line"
  144.     export DISPLAY
  145.   fi
  146.   echo ""
  147.   echo "   DISPLAY has been set to: $DISPLAY"
  148.   echo ""
  149. fi
  150.  
  151. echo ""
  152. test "$alt_echo"
  153. if [ $? = 0 ]
  154. then
  155.   echo -n "Starting PTC.Setup, please wait ..."
  156. else
  157.   echo "Starting PTC.Setup, please wait ...\c"
  158. fi
  159.  
  160. if [ "$mctype" = "sun4_solaris_64" ]
  161. then
  162.   mctype="sun4_solaris"
  163. fi
  164. if [ "$mctype" = "sun4_solaris" ] 
  165. then
  166.   PATH=$PATH:/usr/ucb
  167.   export PATH
  168. fi
  169.  
  170. if [ "$mctype" = "sgi_elf2" -o "$mctype" = "sgi_mips4" ] 
  171. then
  172.   PATH=.:$PATH
  173.   export PATH
  174. fi
  175. if [ "$mctype" = "hpux_pa64" ]
  176. then
  177.   mctype="hpux11_pa32"
  178. fi
  179. if [ "$mctype" = "hpux11_pa32" ]
  180. then
  181.   if [ ! -d "$imagedir/dsrc/$mctype" ]
  182.   then
  183.     mctype="hp8k"
  184.   fi
  185. fi
  186.  
  187. PTC_CDHOME=$imagedir
  188. export PTC_CDHOME
  189. PS_DIRECTORY=$imagedir/dsrc
  190. export PS_DIRECTORY
  191. DPS_DIRECTORY=$imagedir/dsrc
  192. export DPS_DIRECTORY
  193. PRO_MACHINE_TYPE=$mctype
  194. export PRO_MACHINE_TYPE
  195. LC_NUMERIC=C
  196. export LC_NUMERIC
  197.  
  198. test "$PROSETUP_EXE"
  199. if [ $? != 0 ]
  200. then
  201.   PROSETUP_EXE="$imagedir/dsrc/$mctype/obj/ptcsetup"
  202. elif [ -x "$PROSETUP_EXE" ]
  203. then
  204.   echo ""
  205.   test "$alt_echo"
  206.   if [ $? = 0 ]
  207.   then
  208.     echo -n "Using $PROSETUP_EXE ..."
  209.   else
  210.     echo "Using $PROSETUP_EXE ...\c"
  211.   fi
  212.   ($PROSETUP_EXE $other_args ) &
  213.   exit 0
  214. fi
  215.  
  216. if [ ! -x "$PROSETUP_EXE" ]
  217. then
  218.   echo ""
  219.   echo "ERROR:  $PROSETUP_EXE - file is missing."
  220.   echo "        Check the name of the CD mount directory."
  221.   exit 1
  222. fi
  223.  
  224. REDIRECT_EXE="$imagedir/dsrc/$mctype/obj/redirect"
  225. if [ -x "$REDIRECT_EXE" ]
  226. then
  227.   ($REDIRECT_EXE $other_args -multicd ) &
  228. else
  229.   ($PROSETUP_EXE $other_args ) &
  230. fi
  231.  
  232. echo ""
  233. exit 0
  234.